home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Palettes / MiscPaperViewPalette / MiscPaperView.subproj / MiscPaperView.h < prev    next >
Text File  |  1995-07-20  |  2KB  |  75 lines

  1. //        Written by Thomas Engel Copyright (c) 1995 by Thomas Engel.
  2. //                Version 1.0.  All rights reserved.
  3. //
  4. //        This notice may not be removed from this source code.
  5. //
  6. //    This object is included in the MiscKit by permission from the author
  7. //    and its use is governed by the MiscKit license, found in the file
  8. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  9. //    for a list of all applicable permissions and restrictions.
  10. //    
  11.  
  12. #import <misckit/MiscColorView.h>
  13.  
  14. #define Misc_PaperGridNone            0
  15. #define Misc_PaperGridHorizontal    1
  16. #define Misc_PaperGridVertical        2
  17.  
  18. #define Misc_PaperSidelineNone        0
  19. #define Misc_PaperSidelineTop        1
  20. #define Misc_PaperSidelineBottom    2
  21. #define Misc_PaperSidelineLeft        4
  22. #define Misc_PaperSidelineRight        8
  23.  
  24. #define Misc_PaperGridStartsRight    1
  25. #define Misc_PaperGridStartsLow        2
  26.  
  27. // The above bitfield defines can be combined to the following flags:
  28.  
  29. typedef enum
  30. {
  31.     Misc_PaperGridStartsUpperLeft = 0,
  32.     Misc_PaperGridStartsUpperRight,
  33.     Misc_PaperGridStartsLowerLeft,
  34.     Misc_PaperGridStartsLowerRight
  35. } Misc_PaperGridOrigin;
  36.  
  37. @interface MiscPaperView:MiscColorView 
  38. {
  39.     int        gridType;
  40.     int        gridVertOffset;
  41.     int        gridHorOffset;
  42.     NXColor    gridColor;
  43.     int        gridOrigin;
  44.     
  45.     int        sidelineType;
  46.     int        sidelineOffset;
  47.     NXColor    sidelineColor;
  48. }
  49.  
  50. + initialize;
  51. - initFrame:(const NXRect *)frameRect;
  52.  
  53. - setGridColor:(NXColor)color;
  54. - (NXColor)gridColor;
  55. - setGridType:(int)aType withOrigin:(int)theOrigin;
  56. - (int)gridType;
  57. - (int)gridOrigin;
  58. - setGridSizeVertical:(int)vert horizontal:(int)hor;
  59. - (int)verticalGridSize;
  60. - (int)horizontalGridSize;
  61.  
  62. - setSidelineColor:(NXColor)color;
  63. - (NXColor)sidelineColor;
  64. - setSidelineType:(int)aType;
  65. - (int)sidelineType;
  66. - setSidelineOffset:(int)offset;
  67. - (int)sidelineOffset;
  68.  
  69. - drawSelf:(const NXRect *)rects :(int)rectCount;
  70.  
  71. - read:(NXTypedStream *)stream;
  72. - write:(NXTypedStream *)stream;
  73.  
  74. @end
  75.